/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package proyecto.modelo;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author sistemas
 */
@Entity
@Table(name = "inv_ingreso")
@NamedQueries({
    @NamedQuery(name = "InvIngreso.findAll", query = "SELECT i FROM InvIngreso i"),
    @NamedQuery(name = "InvIngreso.findByIngingresoId", query = "SELECT i FROM InvIngreso i WHERE i.ingingresoId = :ingingresoId"),
    @NamedQuery(name = "InvIngreso.findByIngfechaIngreso", query = "SELECT i FROM InvIngreso i WHERE i.ingfechaIngreso = :ingfechaIngreso"),
    @NamedQuery(name = "InvIngreso.findByIngdocumRef", query = "SELECT i FROM InvIngreso i WHERE i.ingdocumRef = :ingdocumRef"),
    @NamedQuery(name = "InvIngreso.findByIngalmacenId", query = "SELECT i FROM InvIngreso i WHERE i.ingalmacenId = :ingalmacenId"),
    @NamedQuery(name = "InvIngreso.findByIngingresoTipo", query = "SELECT i FROM InvIngreso i WHERE i.ingingresoTipo = :ingingresoTipo")})
public class InvIngreso implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "ing_ingresoId")
    private Integer ingingresoId;
    @Column(name = "ing_fechaIngreso")
    private Integer ingfechaIngreso;
    @Column(name = "ing_documRef")
    private String ingdocumRef;
    @Column(name = "ing_almacenId")
    private Integer ingalmacenId;
    @Column(name = "ing_ingresoTipo")
    private Character ingingresoTipo;

    public InvIngreso() {
    }

    public InvIngreso(Integer ingingresoId) {
        this.ingingresoId = ingingresoId;
    }

    public Integer getIngingresoId() {
        return ingingresoId;
    }

    public void setIngingresoId(Integer ingingresoId) {
        this.ingingresoId = ingingresoId;
    }

    public Integer getIngfechaIngreso() {
        return ingfechaIngreso;
    }

    public void setIngfechaIngreso(Integer ingfechaIngreso) {
        this.ingfechaIngreso = ingfechaIngreso;
    }

    public String getIngdocumRef() {
        return ingdocumRef;
    }

    public void setIngdocumRef(String ingdocumRef) {
        this.ingdocumRef = ingdocumRef;
    }

    public Integer getIngalmacenId() {
        return ingalmacenId;
    }

    public void setIngalmacenId(Integer ingalmacenId) {
        this.ingalmacenId = ingalmacenId;
    }

    public Character getIngingresoTipo() {
        return ingingresoTipo;
    }

    public void setIngingresoTipo(Character ingingresoTipo) {
        this.ingingresoTipo = ingingresoTipo;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (ingingresoId != null ? ingingresoId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof InvIngreso)) {
            return false;
        }
        InvIngreso other = (InvIngreso) object;
        if ((this.ingingresoId == null && other.ingingresoId != null) || (this.ingingresoId != null && !this.ingingresoId.equals(other.ingingresoId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "proyecto.modelo.InvIngreso[ingingresoId=" + ingingresoId + "]";
    }

}
